<template>
  <template v-if="icon">
    <img
      :src="icon"
      style="width: 32px; height: 32px; object-fit: contain"
      v-if="icon.startsWith('http') || icon.startsWith('data:image/')"
    />
    <Icon :icon="icon" width="32" v-else></Icon>
  </template>
</template>
<script setup lang="ts">
import { Icon } from '@iconify/vue'
defineProps({
  icon: {
    type: String,
    default: ''
  }
})
</script>
